package org.codeart.chainrespon.example01;

public class Client {

    public static void main(String[] args) {
        Handler handler1 = new HandlerA();
        Handler handler2 = new HandlerB();
        Handler handler3 = new HandlerC();
        
        // 创建处理链条
        handler1.setSuccessor(handler2);
        handler2.setSuccessor(handler3);
        
        RequestData requestData = new RequestData("请求数据: ABCD");
        
        // 调用处理链条头部的方法
        handler1.handle(requestData);
    }

}
